#!/bin/bash

if [[ $# -lt 2 ]]; then
    gran=256
    ratio=0.5
else
    gran=$1
    ratio=$2
fi

threads="4 6 8 12 14 16 20 24 28"
threads="28"
cluster="64 256 1024 4096 16384 65536 262144"
cluster="16384"

for t in $threads; do
    for c in $cluster; do
        taskset -c 0-17,36-53 ./pattern -c $c -t $t -g $gran -r $ratio -p
    done
done